﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace ShenLanCMS.Models
{
    /// <summary>
    /// 留言板
    /// </summary>
    public class Msgboard
    {
        [System.ComponentModel.DataAnnotations.Key]
        public Guid MsgboardID { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Display(Name = "标题")]
        [Required(ErrorMessage = "请填写{0}")]
        [StringLength(128, ErrorMessage = "{0}不能超过{1}个字符")]
        public string Title { get; set; }

        /// <summary>
        /// 留言时间
        /// </summary>
        [Display(Name = "留言时间")]
        public DateTime MsgTime { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [Display(Name = "内容")]
        [Required(ErrorMessage = "请填写{0}")]
        [DataType(DataType.MultilineText)]
        [StringLength(1000, ErrorMessage = "内容不能超过{1}个字符")]
        public string Msg { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        [Display(Name = "用户id")]
        [StringLength(36)]
        public string UserID { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [Display(Name = "昵称")]
        [StringLength(20,ErrorMessage="{0}不能超过{1}个字符")]
        public string NickName { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [Display(Name = "邮箱")]
        [StringLength(64, ErrorMessage = "{0}不能超过{1}个字符")]
        public string Email { get; set; }

        /// <summary>
        /// 个人主页
        /// </summary>
        [Display(Name = "个人主页")]
        [StringLength(128, ErrorMessage = "{0}不能超过{1}个字符")]
        public string SiteUrl { get; set; }
    }
}
